package main

import (
	"fmt"
)

func main() {

	blockChain := NewBlockChain()
	blockChain.AddBlock("第一区块")
	blockChain.AddBlock("第二区块")

	for index, block := range blockChain.Blocks {
		fmt.Printf("====== 区块高度: %v ======\n", index+1)
		fmt.Printf("前区块哈希值: %x\n", block.PrevHash)
		fmt.Printf("区块数据: %s\n", block.Data)
		fmt.Printf("当前区块哈希值: %x\n", block.Hash)
	}

}
